import request from '@/utils/request'

// 群列表
export function groupList(params?: any) {
    return request.get({ url: '/user.group/groupList', params })
}

// 群详情
export function groupInfo(params?: any) {
    return request.get({ url: '/user.group/groupInfo', params })
}

// 群用户信息
export function groupUser(params?: any) {
    return request.get({ url: '/user.group/groupUser', params })
}

//添加群组
export function saveGroup(params?: any) {
    return request.post({ url: '/user.group/saveGroup', params })
}

//删除群组
export function delGroup(params?: any) {
    return request.post({ url: '/user.group/delGroup', params })
}

// 搜索用户
export function searchUser(params?: any) {
    return request.get({ url: '/user.group/searchUser', params })
}

//添加用户
export function addUser(params?: any) {
    return request.post({ url: '/user.group/addUser', params })
}

//删除用户
export function delUser(params?: any) {
    return request.post({ url: '/user.group/delUser', params })
}

// 聊天列表
export function msgList(params?: any) {
    return request.get({ url: '/user.message/msgList', params })
}
// 聊天详情
export function msgDetail(params?: any) {
    return request.get({ url: '/user.message/msgDetail', params })
}
//发送信息
export function addMsg(params?: any) {
    return request.post({ url: '/user.message/addMsg', params })
}

// 客服列表
export function kefuList(params?: any) {
    return request.get({ url: '/user.kefu/kefuList', params })
}
// 客服详情
export function kefuInfo(params?: any) {
    return request.get({ url: '/user.kefu/kefuInfo', params })
}
// 保存客服
export function saveKefu(params?: any) {
    return request.post({ url: '/user.kefu/saveKefu', params })
}
// 搜索渠道
export function searchChannel(params?: any) {
    return request.get({ url: '/user.kefu/searchChannel', params })
}
// 添加渠道绑定客服
export function addChannel(params?: any) {
    return request.post({ url: '/user.kefu/addChannel', params })
}
// 删除渠道绑定客服
export function delChannel(params?: any) {
    return request.post({ url: '/user.kefu/delChannel', params })
}
// 删除客服
export function delKefu(params?: any) {
    return request.post({ url: '/user.kefu/delKefu', params })
}
// 客服下的渠道
export function kefuChannel(params?: any) {
    return request.get({ url: '/user.kefu/kefuChannel', params })
}
// 获取客服列表
export function butlerList(params?: any) {
    return request.get({ url: '/user.group/butlerList', params })
}
// 保存客户
export function saveButler(params?: any) {
    return request.post({ url: '/user.group/saveButler', params })
}
// 创建群聊
export function createCooperationGroup(params?: any) {
    return request.post({ url: '/user.group/createCooperationGroup', params })
}